package com.example.lending.Model;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

@Entity
public class Borrow {
    @PrimaryKey(autoGenerate = true)
    int id;
    @ColumnInfo()
    String time; //借阅时间
    @ColumnInfo()
    String userid; //用户ID
    @ColumnInfo(name="name")
    String name; //名称
    @ColumnInfo()
    int duration;  //借阅期限
    @ColumnInfo()
    int state; //地方
    @ColumnInfo
    String borrowuser; //这里储存borrow的名字


    public String  getUserid() {
        return userid;
    }
    public void setUserid(String userid) {
        this.userid = userid;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getId() {
        return id;
    }
    public void setId(int id) {
        this.id = id;
    }
    @Ignore
    public Borrow(String time, String name, int duration, int state,int id,String borrow) {
        this.time = time;
        this.name = name;
        this.duration = duration;
        this.state = state;
        this.id = id;
        this.borrowuser=borrow;
    }
    @Ignore
    public Borrow(String time, String userid, String name, int duration, int state, int id) {
        this.time = time;
        this.userid = userid;
        this.name = name;
        this.duration = duration;
        this.state = state;
        this.id = id;
    }
    public Borrow() {
    }

    public String getBorrowuser() {
        return borrowuser;
    }

    public void setBorrowuser(String borrowuser) {
        this.borrowuser = borrowuser;
    }

    public String getTime() {
        return time;
    }
    public void setTime(String time) {
        this.time = time;
    }
    public int getDuration() {
        return duration;
    }
    public void setDuration(int duration) {
        this.duration = duration;
    }
    public int getState() {
        return state;
    }
    public void setState(int state) {
        this.state = state;
    }
}
